home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / programs / lora210e.zip / STRUCT.ZIP / SENDMSG.C < prev    next >
C/C++ Source or Header  |  1992-04-07  |  1KB  |  51 lines

  1. /*
  2.                           Lora-CBIS Ver. 2.00
  3.  
  4.              Copyright (c) 1989, 1990, 1991 by Marco Maccaferri.
  5.                           All rights reserved.
  6.  
  7.  
  8.                           Source code examples
  9.                           Send on-line message
  10.  
  11.  
  12.   You may use this structures at your own risk. The author cannot guarantee
  13.   that this structures are maintained in all future versions of the program.
  14.   You can freely (and you are encouraged on that) distribute this file
  15.   without limitations.
  16.  
  17.   You can contact the autor at one of the following address:
  18.  
  19.   Marco Maccaferri
  20.   BBS: 39-51-6331730 (2:332/402)
  21.   BIX: marco.m
  22.  
  23. */
  24. #include <stdio.h>
  25. #include <string.h>
  26.  
  27. #include "lora.h"
  28.  
  29. void send_online_message(linea, name, task, ul)
  30. char *linea, *name;
  31. int task, ul;
  32. {
  33.    FILE *fp;
  34.    char filename[14];
  35.  
  36.    printf ("\nProcessing...");
  37.  
  38.    sprintf(filename, "LINE%d.BBS", ul);
  39.    fp = fopen(filename, "at");
  40.  
  41.    fprintf(fp, "\n\n** MESSAGE **\n");
  42.    fprintf(fp, "From: %s on line %d\n", name, task);
  43.    fprintf(fp, "\n\"%s\"\n\n", linea);
  44.    fprintf(fp, "\001");
  45.  
  46.    fclose(fp);
  47.  
  48.    printf("Sent\n\n");
  49. }
  50.  
  51.